<?php /* Smarty version Smarty-3.1.6, created on 2017-05-16 15:52:24
         compiled from "Upload\question\20170516\au2d73brv.html" */ ?>
<?php /*%%SmartyHeaderCode:19369591aafb86d6375-96128532%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '1b600b11a6a8a342c45258b634c319d7a96ea194' => 
    array (
      0 => 'Upload\\question\\20170516\\au2d73brv.html',
      1 => 1494921140,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '19369591aafb86d6375-96128532',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.6',
  'unifunc' => 'content_591aafb87347d',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_591aafb87347d')) {function content_591aafb87347d($_smarty_tpl) {?><strong>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">说明：以下代码是把一个字符串倒序，如“abcd”倒序后变为“dcba”找出程序中的错误。</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">1、#include &lt;string.h&gt;</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">2、#include &lt;stdio.h&gt;</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">3、int main()</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">4、{</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">5、 &nbsp;&nbsp;&nbsp;char*src="hello,world";</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">6、 &nbsp;&nbsp;&nbsp;char* dest=NULL;</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">7、 &nbsp;&nbsp;&nbsp;int len=strlen(src);</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">8、 &nbsp;</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"> </span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;">dest=(char*)malloc(len); &nbsp;</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">9、 &nbsp;&nbsp;&nbsp;char* d=dest;</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">10、 &nbsp;&nbsp;char* s=src[len];</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">11、 &nbsp;&nbsp;while(len--!=0)</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">12、 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;d++=s--; </span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">13、 &nbsp;&nbsp;printf("%s",dest); </span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">14、 &nbsp;&nbsp;return 0;</span><span style="font-family:宋体;color:#000000;font-size:12.0000pt;"></span>
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;color:#000000;font-size:12.0000pt;">15、}&nbsp; <br />
</span>
</p>
</strong><?php }} ?>